﻿using Yu.Cms.DALFactory;
using Yu.Cms.IDAL;
using System.Collections.Generic;

namespace Yu.Cms.BLL
{
    /// <summary>
    /// Tags
    /// </summary>
    public class Tags
    {
        private readonly ITags dal = DataAccess.CreateTags();
        public Tags()
        { }
        #region  Method
      

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int AddAddTag(Yu.Cms.Model.Tags model)
        {
            return dal.AddTag(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public int Update(Yu.Cms.Model.Tags model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public int Delete(int tagid)
        {
            return dal.Delete(tagid);
        }

        /// <summary>
        /// 删除一组
        /// </summary>
        /// <param name="tagid">1,2,3</param>
        /// <returns></returns>
        public int DeleteList(string tagid)
        {
            return dal.DeleteList(tagid);
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Yu.Cms.Model.Tags GetModel(int tagid)
        {

            return dal.GetModel(tagid);
        }

        /// <summary>
        /// 获取所有TAG列表
        /// </summary>
        /// <returns></returns>
        public IList<Yu.Cms.Model.Tags> GetTagList()
        {
            return dal.GetTagList();
        }

        #endregion  Method
    }
}
